package com.rc.saas.tenant.vo.gun;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.rc.saas.tenant.common.utils.DateHelper;
import com.rc.saas.tenant.model.elec.ElecGun;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 在线监控折线图
 *
 * @Author: yang
 * @Date: 2022/6/10 23:20
 */
public class ElecGunMonitorChartVo {

    private String stationName; //站点名称

    private BigDecimal payAmount;      //营业额

    private BigDecimal totalPower; // 总电量

    private BigDecimal elecMoney; //电费

    private BigDecimal serviceMoney; //服务费

    private Integer orderCount;  //充电次数

//    @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
//    @DateTimeFormat(pattern = "yyyy-MM")
    private String months;  //日期 月

//    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
//    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private String days;  //日期 日

    private String type; //0日 1月

    public ElecGunMonitorChartVo() {
    }

    public ElecGunMonitorChartVo(String type, Date date) {
        if ("1".equals(type)) {
//            this.months = date;
            String s = DateHelper.dataToString(date, "yyyy-MM");
            this.months =s;
            this.type = type;
        } else {
            this.type="0";
            String s = DateHelper.dataToString(date, "yyyy-MM-dd");
            this.days = s;
        }

        this.payAmount = BigDecimal.ZERO;
        this.totalPower = BigDecimal.ZERO;
        this.elecMoney = BigDecimal.ZERO;
        this.serviceMoney = BigDecimal.ZERO;
        this.orderCount = 0;
    }


    public String getStationName() {
        return stationName;
    }

    public void setStationName(String stationName) {
        this.stationName = stationName;
    }

    public BigDecimal getPayAmount() {
        return payAmount;
    }

    public void setPayAmount(BigDecimal payAmount) {
        this.payAmount = payAmount;
    }

    public BigDecimal getTotalPower() {
        return totalPower;
    }

    public void setTotalPower(BigDecimal totalPower) {
        this.totalPower = totalPower;
    }

    public BigDecimal getElecMoney() {
        return elecMoney;
    }

    public void setElecMoney(BigDecimal elecMoney) {
        this.elecMoney = elecMoney;
    }

    public BigDecimal getServiceMoney() {
        return serviceMoney;
    }

    public void setServiceMoney(BigDecimal serviceMoney) {
        this.serviceMoney = serviceMoney;
    }

    public Integer getOrderCount() {
        return orderCount;
    }

    public void setOrderCount(Integer orderCount) {
        this.orderCount = orderCount;
    }

    public String getMonths() {
        return months;
    }

    public void setMonths(String months) {
        this.months = months;
    }

    public String getDays() {
        return days;
    }

    public void setDays(String days) {
        this.days = days;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
